import scrapy


class doubanSpider(scrapy.Spider):
    name = 'douban'
    allwed_url = 'douban.com'
    start_urls = [
        'https://movie.douban.com/top250/'
    ]

    def parse(self, response):
        movie_name = response.xpath("//div[@class='item']//a/span[1]/text()").extract()
        movie_core = response.xpath("//div[@class='star']/span[2]/text()").extract()
        yield {
            'movie_name':movie_name,
            'movie_core':movie_core
        }